%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/d.createPerson"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 16, 17<br /><br />1: PgInsertSingle[13]<br />2: <br />ᐳ: Object[18]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 18, 13<br /><br />ROOT Object{1}ᐸ{result}ᐳ[18]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 13<br /><br />ROOT PgInsertSingle{1}ᐸperson()ᐳ[13]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2
    Bucket2 --> Bucket3

    %% plan dependencies
    __InputObject8{{"__InputObject[8∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ'Doe'ᐳ[29]<br />- Constantᐸ'create2'ᐳ[30]<br />- Constantᐸ'create1'ᐳ[31]<br />- Constantᐸ'create3'ᐳ[32]"}}:::plan
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject8 --> __InputObject6
    Object16{{"Object[16∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access14{{"Access[14∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access15{{"Access[15∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access14 & Access15 --> Object16
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access14
    __Value2 --> Access15
    ApplyInput17{{"ApplyInput[17∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput17
    PgInsertSingle13[["PgInsertSingle[13∈1] ➊<br />ᐸperson()ᐳ"]]:::sideeffectplan
    Object16 & ApplyInput17 --> PgInsertSingle13
    Object18{{"Object[18∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgInsertSingle13 --> Object18
    PgClassExpression19{{"PgClassExpression[19∈3] ➊<br />ᐸ__person__.”id”ᐳ"}}:::plan
    Access20{{"Access[20∈3] ➊<br />ᐸ13.tᐳ"}}:::plan
    Access20 --> PgClassExpression19
    PgInsertSingle13 --> Access20
    PgClassExpression21{{"PgClassExpression[21∈3] ➊<br />ᐸ__person__.”first_name”ᐳ"}}:::plan
    PgClassExpression19 o--o PgClassExpression21
    PgClassExpression22{{"PgClassExpression[22∈3] ➊<br />ᐸ__person__.”last_name”ᐳ"}}:::plan
    PgClassExpression21 o--o PgClassExpression22
    PgClassExpression23{{"PgClassExpression[23∈3] ➊<br />ᐸ__person__...no_create”ᐳ"}}:::plan
    PgClassExpression22 o--o PgClassExpression23
    PgClassExpression24{{"PgClassExpression[24∈3] ➊<br />ᐸ__person__...no_update”ᐳ"}}:::plan
    PgClassExpression23 o--o PgClassExpression24
    PgClassExpression25{{"PgClassExpression[25∈3] ➊<br />ᐸ__person__..._no_order”ᐳ"}}:::plan
    PgClassExpression24 o--o PgClassExpression25
    PgClassExpression26{{"PgClassExpression[26∈3] ➊<br />ᐸ__person__...no_filter”ᐳ"}}:::plan
    PgClassExpression25 o--o PgClassExpression26
    PgClassExpression27{{"PgClassExpression[27∈3] ➊<br />ᐸ__person__...te_update”ᐳ"}}:::plan
    PgClassExpression26 o--o PgClassExpression27
    PgClassExpression28{{"PgClassExpression[28∈3] ➊<br />ᐸ__person__...er_filter”ᐳ"}}:::plan
    PgClassExpression27 o--o PgClassExpression28

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,__InputObject8,Access14,Access15,Object16,ApplyInput17 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgInsertSingle13,Object18 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,PgClassExpression19,Access20,PgClassExpression21,PgClassExpression22,PgClassExpression23,PgClassExpression24,PgClassExpression25,PgClassExpression26,PgClassExpression27,PgClassExpression28 bucket3

